package com.git.hui.yinshua.biz.goods.dao.mapper;

import com.git.hui.yinshua.biz.goods.dao.domain.CategoryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author YiHui
 * @date 2024/6/12
 */
@Mapper
public interface CategoryMapper {

    Integer saveCategory(@Param("category") CategoryEntity category);

    Integer updateCategory(CategoryEntity category);

    CategoryEntity getById(@Param("id") Integer categoryId);

    CategoryEntity getByCategory(@Param("category") String category);

    List<CategoryEntity> listByIds(@Param("ids") List<Integer> ids);

    List<CategoryEntity> list(@Param("start") Integer start, @Param("size") Integer size, @Param("state") Integer state);

    /**
     * 计数
     *
     * @return
     */
    Integer count();
}
